// permission
// 封装权限相关接口

import request from "@/utils/request"

export const getPermissionList = () => {
    return request.get('/sys/permission')
}

// 添加权限
export const addPermission = (data) => {
    return request.post('/sys/permission', data)
}

// 删除权限
export const deletePermission = (id) => {
    return request.delete(`/sys/permission/${id}`)
}

// 获取权限详情
export const getPermissionDetail = (id) => {
    return request.get(`/sys/permission/${id}`)
}
// 编辑权限
export const updatePermission = (data) => {
    return request.put(`/sys/permission/${data.id}`, data)
}